Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Wait  Until  One  Application  Has  Quit  Before  Starting  a  Second  Application  

 Content of Wait Until One Application Has Quit Before Starting a Second Application.vbs
MD5 Hash: 178A8ACF209260B1CBA2B7469E7B14B8
strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")

errReturn = objProcess.Create("Notepad.exe", null, null, intProcessID)

Set colMonitoredProcesses = objWMIService. _
ExecNotificationQuery("select * From __InstanceDeletionEvent " _
& " within 1 where TargetInstance isa 'Win32_Process'")

Do While True
Set objLatestProcess = colMonitoredProcesses.NextEvent
If objLatestProcess.TargetInstance.ProcessID = intProcessID Then
Exit Do
End If
Loop

errReturn = objProcess.Create("Calc.exe", null, null, intProcessID)



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a